package com.study.configuration;

import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

/**
 * @Author tanglingyu
 * @Date: 2021/09/08/ 19:38
 * @Description
 */
@Configuration(proxyBeanMethods = false)
public class TestPrimaryAnnotation {

  @Bean
  @Primary
  public PrimaryAnnotation get1(){
   return new PrimaryAnnotation();
  }

  @Bean
  public PrimaryAnnotation get2(){
    return new PrimaryAnnotation();
  }


  @Data
  public static class PrimaryAnnotation {

    private String primary = "sb";
  }

  @Data
  public static class TestOrder {

    private String order = "sb";
  }

  @Data
  public static class TestOrder2 {

    private String order = "sb";
  }

}
